% This scripts estimates fourier components of random signals in a larger
% array. The data are feed back into the original array. The idea is to
% check the consistency of fft routine (kallam)

tic;
a = rand([1,1000000]); 
a1 = a;
for i = 1:10000000, 
    
    b = fft(a);
    a = ifft(b); 
    
    if rms(a-a1) > 1,
        break;
    end;
    
end;
toc;